package com.entity;

import java.util.ArrayList;
import java.util.List;

public class BuildingExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Long offset;

    public BuildingExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Long offset) {
        this.offset = offset;
    }

    public Long getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andBuildingidIsNull() {
            addCriterion("buildingid is null");
            return (Criteria) this;
        }

        public Criteria andBuildingidIsNotNull() {
            addCriterion("buildingid is not null");
            return (Criteria) this;
        }

        public Criteria andBuildingidEqualTo(Integer value) {
            addCriterion("buildingid =", value, "buildingid");
            return (Criteria) this;
        }

        public Criteria andBuildingidNotEqualTo(Integer value) {
            addCriterion("buildingid <>", value, "buildingid");
            return (Criteria) this;
        }

        public Criteria andBuildingidGreaterThan(Integer value) {
            addCriterion("buildingid >", value, "buildingid");
            return (Criteria) this;
        }

        public Criteria andBuildingidGreaterThanOrEqualTo(Integer value) {
            addCriterion("buildingid >=", value, "buildingid");
            return (Criteria) this;
        }

        public Criteria andBuildingidLessThan(Integer value) {
            addCriterion("buildingid <", value, "buildingid");
            return (Criteria) this;
        }

        public Criteria andBuildingidLessThanOrEqualTo(Integer value) {
            addCriterion("buildingid <=", value, "buildingid");
            return (Criteria) this;
        }

        public Criteria andBuildingidIn(List<Integer> values) {
            addCriterion("buildingid in", values, "buildingid");
            return (Criteria) this;
        }

        public Criteria andBuildingidNotIn(List<Integer> values) {
            addCriterion("buildingid not in", values, "buildingid");
            return (Criteria) this;
        }

        public Criteria andBuildingidBetween(Integer value1, Integer value2) {
            addCriterion("buildingid between", value1, value2, "buildingid");
            return (Criteria) this;
        }

        public Criteria andBuildingidNotBetween(Integer value1, Integer value2) {
            addCriterion("buildingid not between", value1, value2, "buildingid");
            return (Criteria) this;
        }

        public Criteria andBuildingnameIsNull() {
            addCriterion("buildingname is null");
            return (Criteria) this;
        }

        public Criteria andBuildingnameIsNotNull() {
            addCriterion("buildingname is not null");
            return (Criteria) this;
        }

        public Criteria andBuildingnameEqualTo(String value) {
            addCriterion("buildingname =", value, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnameNotEqualTo(String value) {
            addCriterion("buildingname <>", value, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnameGreaterThan(String value) {
            addCriterion("buildingname >", value, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnameGreaterThanOrEqualTo(String value) {
            addCriterion("buildingname >=", value, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnameLessThan(String value) {
            addCriterion("buildingname <", value, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnameLessThanOrEqualTo(String value) {
            addCriterion("buildingname <=", value, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnameLike(String value) {
            addCriterion("buildingname like", value, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnameNotLike(String value) {
            addCriterion("buildingname not like", value, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnameIn(List<String> values) {
            addCriterion("buildingname in", values, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnameNotIn(List<String> values) {
            addCriterion("buildingname not in", values, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnameBetween(String value1, String value2) {
            addCriterion("buildingname between", value1, value2, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnameNotBetween(String value1, String value2) {
            addCriterion("buildingname not between", value1, value2, "buildingname");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberIsNull() {
            addCriterion("buildingnumber is null");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberIsNotNull() {
            addCriterion("buildingnumber is not null");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberEqualTo(String value) {
            addCriterion("buildingnumber =", value, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberNotEqualTo(String value) {
            addCriterion("buildingnumber <>", value, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberGreaterThan(String value) {
            addCriterion("buildingnumber >", value, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberGreaterThanOrEqualTo(String value) {
            addCriterion("buildingnumber >=", value, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberLessThan(String value) {
            addCriterion("buildingnumber <", value, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberLessThanOrEqualTo(String value) {
            addCriterion("buildingnumber <=", value, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberLike(String value) {
            addCriterion("buildingnumber like", value, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberNotLike(String value) {
            addCriterion("buildingnumber not like", value, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberIn(List<String> values) {
            addCriterion("buildingnumber in", values, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberNotIn(List<String> values) {
            addCriterion("buildingnumber not in", values, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberBetween(String value1, String value2) {
            addCriterion("buildingnumber between", value1, value2, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andBuildingnumberNotBetween(String value1, String value2) {
            addCriterion("buildingnumber not between", value1, value2, "buildingnumber");
            return (Criteria) this;
        }

        public Criteria andFloorIsNull() {
            addCriterion("`floor` is null");
            return (Criteria) this;
        }

        public Criteria andFloorIsNotNull() {
            addCriterion("`floor` is not null");
            return (Criteria) this;
        }

        public Criteria andFloorEqualTo(Integer value) {
            addCriterion("`floor` =", value, "floor");
            return (Criteria) this;
        }

        public Criteria andFloorNotEqualTo(Integer value) {
            addCriterion("`floor` <>", value, "floor");
            return (Criteria) this;
        }

        public Criteria andFloorGreaterThan(Integer value) {
            addCriterion("`floor` >", value, "floor");
            return (Criteria) this;
        }

        public Criteria andFloorGreaterThanOrEqualTo(Integer value) {
            addCriterion("`floor` >=", value, "floor");
            return (Criteria) this;
        }

        public Criteria andFloorLessThan(Integer value) {
            addCriterion("`floor` <", value, "floor");
            return (Criteria) this;
        }

        public Criteria andFloorLessThanOrEqualTo(Integer value) {
            addCriterion("`floor` <=", value, "floor");
            return (Criteria) this;
        }

        public Criteria andFloorIn(List<Integer> values) {
            addCriterion("`floor` in", values, "floor");
            return (Criteria) this;
        }

        public Criteria andFloorNotIn(List<Integer> values) {
            addCriterion("`floor` not in", values, "floor");
            return (Criteria) this;
        }

        public Criteria andFloorBetween(Integer value1, Integer value2) {
            addCriterion("`floor` between", value1, value2, "floor");
            return (Criteria) this;
        }

        public Criteria andFloorNotBetween(Integer value1, Integer value2) {
            addCriterion("`floor` not between", value1, value2, "floor");
            return (Criteria) this;
        }

        public Criteria andCountIsNull() {
            addCriterion("`count` is null");
            return (Criteria) this;
        }

        public Criteria andCountIsNotNull() {
            addCriterion("`count` is not null");
            return (Criteria) this;
        }

        public Criteria andCountEqualTo(Integer value) {
            addCriterion("`count` =", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountNotEqualTo(Integer value) {
            addCriterion("`count` <>", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountGreaterThan(Integer value) {
            addCriterion("`count` >", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountGreaterThanOrEqualTo(Integer value) {
            addCriterion("`count` >=", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountLessThan(Integer value) {
            addCriterion("`count` <", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountLessThanOrEqualTo(Integer value) {
            addCriterion("`count` <=", value, "count");
            return (Criteria) this;
        }

        public Criteria andCountIn(List<Integer> values) {
            addCriterion("`count` in", values, "count");
            return (Criteria) this;
        }

        public Criteria andCountNotIn(List<Integer> values) {
            addCriterion("`count` not in", values, "count");
            return (Criteria) this;
        }

        public Criteria andCountBetween(Integer value1, Integer value2) {
            addCriterion("`count` between", value1, value2, "count");
            return (Criteria) this;
        }

        public Criteria andCountNotBetween(Integer value1, Integer value2) {
            addCriterion("`count` not between", value1, value2, "count");
            return (Criteria) this;
        }

        public Criteria andTotalareaIsNull() {
            addCriterion("totalarea is null");
            return (Criteria) this;
        }

        public Criteria andTotalareaIsNotNull() {
            addCriterion("totalarea is not null");
            return (Criteria) this;
        }

        public Criteria andTotalareaEqualTo(Integer value) {
            addCriterion("totalarea =", value, "totalarea");
            return (Criteria) this;
        }

        public Criteria andTotalareaNotEqualTo(Integer value) {
            addCriterion("totalarea <>", value, "totalarea");
            return (Criteria) this;
        }

        public Criteria andTotalareaGreaterThan(Integer value) {
            addCriterion("totalarea >", value, "totalarea");
            return (Criteria) this;
        }

        public Criteria andTotalareaGreaterThanOrEqualTo(Integer value) {
            addCriterion("totalarea >=", value, "totalarea");
            return (Criteria) this;
        }

        public Criteria andTotalareaLessThan(Integer value) {
            addCriterion("totalarea <", value, "totalarea");
            return (Criteria) this;
        }

        public Criteria andTotalareaLessThanOrEqualTo(Integer value) {
            addCriterion("totalarea <=", value, "totalarea");
            return (Criteria) this;
        }

        public Criteria andTotalareaIn(List<Integer> values) {
            addCriterion("totalarea in", values, "totalarea");
            return (Criteria) this;
        }

        public Criteria andTotalareaNotIn(List<Integer> values) {
            addCriterion("totalarea not in", values, "totalarea");
            return (Criteria) this;
        }

        public Criteria andTotalareaBetween(Integer value1, Integer value2) {
            addCriterion("totalarea between", value1, value2, "totalarea");
            return (Criteria) this;
        }

        public Criteria andTotalareaNotBetween(Integer value1, Integer value2) {
            addCriterion("totalarea not between", value1, value2, "totalarea");
            return (Criteria) this;
        }

        public Criteria andDescripeIsNull() {
            addCriterion("descripe is null");
            return (Criteria) this;
        }

        public Criteria andDescripeIsNotNull() {
            addCriterion("descripe is not null");
            return (Criteria) this;
        }

        public Criteria andDescripeEqualTo(String value) {
            addCriterion("descripe =", value, "descripe");
            return (Criteria) this;
        }

        public Criteria andDescripeNotEqualTo(String value) {
            addCriterion("descripe <>", value, "descripe");
            return (Criteria) this;
        }

        public Criteria andDescripeGreaterThan(String value) {
            addCriterion("descripe >", value, "descripe");
            return (Criteria) this;
        }

        public Criteria andDescripeGreaterThanOrEqualTo(String value) {
            addCriterion("descripe >=", value, "descripe");
            return (Criteria) this;
        }

        public Criteria andDescripeLessThan(String value) {
            addCriterion("descripe <", value, "descripe");
            return (Criteria) this;
        }

        public Criteria andDescripeLessThanOrEqualTo(String value) {
            addCriterion("descripe <=", value, "descripe");
            return (Criteria) this;
        }

        public Criteria andDescripeLike(String value) {
            addCriterion("descripe like", value, "descripe");
            return (Criteria) this;
        }

        public Criteria andDescripeNotLike(String value) {
            addCriterion("descripe not like", value, "descripe");
            return (Criteria) this;
        }

        public Criteria andDescripeIn(List<String> values) {
            addCriterion("descripe in", values, "descripe");
            return (Criteria) this;
        }

        public Criteria andDescripeNotIn(List<String> values) {
            addCriterion("descripe not in", values, "descripe");
            return (Criteria) this;
        }

        public Criteria andDescripeBetween(String value1, String value2) {
            addCriterion("descripe between", value1, value2, "descripe");
            return (Criteria) this;
        }

        public Criteria andDescripeNotBetween(String value1, String value2) {
            addCriterion("descripe not between", value1, value2, "descripe");
            return (Criteria) this;
        }

        public Criteria andHidIsNull() {
            addCriterion("hid is null");
            return (Criteria) this;
        }

        public Criteria andHidIsNotNull() {
            addCriterion("hid is not null");
            return (Criteria) this;
        }

        public Criteria andHidEqualTo(Integer value) {
            addCriterion("hid =", value, "hid");
            return (Criteria) this;
        }

        public Criteria andHidNotEqualTo(Integer value) {
            addCriterion("hid <>", value, "hid");
            return (Criteria) this;
        }

        public Criteria andHidGreaterThan(Integer value) {
            addCriterion("hid >", value, "hid");
            return (Criteria) this;
        }

        public Criteria andHidGreaterThanOrEqualTo(Integer value) {
            addCriterion("hid >=", value, "hid");
            return (Criteria) this;
        }

        public Criteria andHidLessThan(Integer value) {
            addCriterion("hid <", value, "hid");
            return (Criteria) this;
        }

        public Criteria andHidLessThanOrEqualTo(Integer value) {
            addCriterion("hid <=", value, "hid");
            return (Criteria) this;
        }

        public Criteria andHidIn(List<Integer> values) {
            addCriterion("hid in", values, "hid");
            return (Criteria) this;
        }

        public Criteria andHidNotIn(List<Integer> values) {
            addCriterion("hid not in", values, "hid");
            return (Criteria) this;
        }

        public Criteria andHidBetween(Integer value1, Integer value2) {
            addCriterion("hid between", value1, value2, "hid");
            return (Criteria) this;
        }

        public Criteria andHidNotBetween(Integer value1, Integer value2) {
            addCriterion("hid not between", value1, value2, "hid");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}